<?php
//--------------------------------------------------
// Patch file:	patch_acp_pm.php
// Patch time:	Sun 12 Mar 2006, 19:05 (GMT)
//--------------------------------------------------
if ( !defined('IN_PHPBB') )
{
	die('Hack attempt');
}

// header
$patch_version = '1.0.0';
$patch_date = '20060630';
$patch_author = 'impleri';
$patch_ref = 'Configuration : pm system options';

// panels and fields
$patch_data = array(
	'acp' => array(
		'name' => 'Admin_control_panel',
		'options' => array(

			'attachcp' => array(
				'name' => 'Attachments',
				'auth' => array(POST_PANELS_URL => 'access'),
				'options' => array(

					'config' => array(
						'name' => 'Attach_config',
						'file' => 'includes/acp/acp_attach_config',
						'auth' => array(POST_PANELS_URL => 'access'),
						'options' => array(

							'server' => array(
								'name' => 'Attach_server',
								'file' => 'includes/acp/acp_attach_config_srv',
								'auth' => array(POST_PANELS_URL => 'access'),
								'fields' => array(
									'upload_dir' => array('type' => 'internal_dir', 'legend' => 'Upload_directory', 'explain' => 'Upload_directory_explain', 'field' => 'upload_dir'),
									'ftp_info_title' => array('type' => 'sub_title', 'legend' => 'ftp_info'),
									'allow_ftp_upload' => array('type' => 'radio_list', 'legend' => 'Ftp_upload', 'options' => '[var]list_no_yes', 'field' => 'allow_ftp_upload', 'explain' => 'Ftp_upload_explain'),
									'ftp_server' => array('type' => 'varchar', 'legend' => 'Ftp_server', 'explain' => 'Ftp_server_explain', 'field' => 'ftp_server'),
									'ftp_port' => array('type' => 'int', 'legend' => 'Ftp_port', 'explain' => 'Ftp_port_explain', 'value' => '21', 'field' => 'ftp_port'),
									'ftp_path' => array('type' => 'varchar', 'legend' => 'Attach_ftp_path', 'explain' => 'Attach_ftp_path_explain', 'field' => 'ftp_path'),
									'download_path' => array('type' => 'varchar', 'legend' => 'Ftp_download_path', 'explain' => 'Ftp_download_path_explain', 'field' => 'download_path'),
									'ftp_pasv_mode' => array('type' => 'radio_list', 'legend' => 'Ftp_passive_mode', 'options' => '[var]list_no_yes', 'field' => 'ftp_pasv_mode', 'explain' => 'Ftp_passive_mode_explain'),
									'ftp_user' => array('type' => 'varchar', 'legend' => 'ftp_username', 'field' => 'ftp_user', 'length' => '25'),
									'ftp_pass' => array('type' => 'password', 'legend' => 'ftp_password', 'field' => 'ftp_password', 'length' => '25'),
								),
							),

							'options' => array(
								'name' => 'Attach_options_settings',
								'auth' => array(POST_PANELS_URL => 'access'),
								'fields' => array(
									'disable_mod' => array('type' => 'radio_list', 'legend' => 'Disable_mod', 'options' => '[var]list_no_yes', 'explain' => 'Disable_mod_explain', 'field' => 'disable_mod'),
									'attachment_quota' => array('type' => 'attach_filesize', 'legend' => 'Attach_quota', 'explain' => 'Attach_quota_explain', 'field' => 'attachment_quota', 'class_file' => 'includes/class_attach_cp_fields'),
									'posts_title' => array('type' => 'sub_title', 'legend' => 'Posts'),
									'max_attachments' => array('type' => 'int', 'legend' => 'Max_attachments', 'explain' => 'Max_attachments_explain', 'field' => 'max_attachments'),
									'max_filesize' => array('type' => 'attach_filesize', 'legend' => 'Max_filesize_attach', 'explain' => 'Max_filesize_attach_explain', 'field' => 'max_filesize', 'class_file' => 'includes/class_attach_cp_fields'),
									'default_upload_quota' => array('type' => 'attach_dft_quota', 'legend' => 'Default_quota_limit', 'explain' => 'Default_quota_limit_explain', 'field' => 'default_upload_quota', 'class_file' => 'includes/class_attach_cp_fields'),
									'pm_title' => array('type' => 'sub_title', 'legend' => 'Private_Messages'),
									'allow_pm_attach' => array('type' => 'radio_list', 'legend' => 'PM_Attachments', 'options' => '[var]list_no_yes', 'field' => 'allow_pm_attach', 'explain' => 'PM_Attachments_explain'),
									'max_attachments_pm' => array('type' => 'int', 'legend' => 'Max_attachments_pm', 'explain' => 'Max_attachments_pm_explain', 'field' => 'max_attachments_pm'),
									'max_filesize_pm' => array('type' => 'attach_filesize', 'legend' => 'Max_filesize_pm', 'explain' => 'Max_filesize_pm_explain', 'field' => 'max_filesize_pm', 'class_file' => 'includes/class_attach_cp_fields'),
									'default_pm_quota' => array('type' => 'attach_dft_quota', 'legend' => 'Default_quota_limit', 'explain' => 'Default_quota_limit_explain', 'field' => 'default_pm_quota', 'class_file' => 'includes/class_attach_cp_fields'),
								),
							),

							'layout' => array(
								'name' => 'Board_layout',
								'auth' => array(POST_PANELS_URL => 'access'),
								'fields' => array(
									'upload_img' => array('type' => 'varchar', 'legend' => 'Attach_img_path', 'explain' => 'Attach_img_path_explain', 'field' => 'upload_img'),
									'topic_icon' => array('type' => 'varchar', 'legend' => 'Attach_topic_icon', 'explain' => 'Attach_topic_icon_explain', 'field' => 'topic_icon'),
									'display_order' => array('type' => 'list', 'legend' => 'Attach_display_order', 'explain' => 'Attach_display_order_explain', 'options' => array('\'0\'' => 'Sort_Descending', 1 => 'Sort_Ascending')),
									'attachment_topic_review' => array('type' => 'radio_list', 'legend' => 'Attachment_topic_review', 'options' => '[var]list_no_yes', 'field' => 'attachment_topic_review', 'explain' => 'Attachment_topic_review_explain'),
								),
							),

							'quotadef' => array(
								'name' => 'Attach_quota_def',
								'file' => 'includes/acp/acp_attach_quota_def',
								'auth' => array(POST_PANELS_URL => 'access'),
							),

							'cat' => array(
								'name' => 'Special_categories',
								'file' => 'includes/acp/acp_attach_cats',
								'auth' => array(POST_PANELS_URL => 'access'),
								'options' => array(

									'images' => array(
										'name' => 'Category_images',
										'auth' => array(POST_PANELS_URL => 'access'),
										'fields' => array(
											'settings_title' => array('type' => 'sub_title', 'legend' => 'Settings_cat_images'),
											'img_display_inlined' => array('type' => 'radio_list', 'legend' => 'Display_inlined', 'options' => '[var]list_no_yes', 'explain' => 'Display_inlined_explain', 'field' => 'img_display_inlined'),
											'img_create_thumbnail' => array('type' => 'radio_list', 'legend' => 'Image_create_thumbnail', 'options' => '[var]list_no_yes', 'field' => 'img_create_thumbnail', 'explain' => 'Image_create_thumbnail_explain'),
											'img_min_thumb_filesize' => array('type' => 'attach_filesize', 'legend' => 'Image_min_thumb_filesize', 'explain' => 'Image_min_thumb_filesize_explain', 'field' => 'img_min_thumb_filesize', 'class_file' => 'includes/class_attach_cp_fields'),
											'use_gd2' => array('type' => 'radio_list', 'legend' => 'Use_gd2', 'options' => '[var]list_no_yes', 'field' => 'use_gd2', 'explain' => 'Use_gd2_explain'),
											'img_imagick' => array('type' => 'varchar', 'legend' => 'Image_imagick_path', 'explain' => 'Image_imagick_path_explain', 'field' => 'img_imagick'),
											'search_imagick' => array('type' => 'button', 'legend' => 'Image_search_imagick', 'image' => 'cmd_search', 'combined' => '1', 'linefeed' => '1'),
											'img_max_width' => array('type' => 'int', 'legend' => 'Max_image_size', 'explain' => 'Max_image_size_explain', 'field' => 'img_max_width', 'post_value' => 'x'),
											'img_max_height' => array('type' => 'int', 'field' => 'img_max_height', 'combined' => '1'),
											'img_link_width' => array('type' => 'int', 'legend' => 'Image_link_size', 'explain' => 'Image_link_size_explain', 'field' => 'img_link_width', 'post_value' => 'x'),
											'img_link_height' => array('type' => 'int', 'field' => 'img_link_height', 'combined' => '1'),
										),
									),

									'stream' => array(
										'name' => 'Category_stream_files',
										'auth' => array(POST_PANELS_URL => 'access'),
									),

									'swf' => array(
										'name' => 'Category_swf_files',
										'auth' => array(POST_PANELS_URL => 'access'),
									),

									'denied' => array(
										'name' => 'Category_denied',
										'auth' => array(POST_PANELS_URL => 'access'),
									),

									'none' => array(
										'name' => 'Not_assigned',
										'auth' => array(POST_PANELS_URL => 'access'),
									),
								),
							),

							'group' => array(
								'name' => 'Extension_groups',
								'file' => 'includes/acp/acp_attach_ext_groups',
								'auth' => array(POST_PANELS_URL => 'access'),
								'fields' => array(
									'ext_group_name' => array('type' => 'varchar', 'legend' => 'Extension_group', 'length_maxi' => '20', 'length' => '20'),
									'cat_id' => array('type' => 'list', 'legend' => 'Special_category', 'options' => '[func][includes/class_attach_cp_fields]get_special_categories'),
									'allow_group' => array('type' => 'radio_list', 'legend' => 'Allowed', 'options' => '[var]list_no_yes'),
									'download_mode' => array('type' => 'list', 'legend' => 'Download_mode', 'options' => '[func][includes/class_attach_cp_fields]get_download_modes'),
									'upload_icon' => array('type' => 'varchar', 'legend' => 'Upload_icon', 'length_maxi' => '100'),
									'max_filesize' => array('type' => 'attach_filesize', 'legend' => 'Max_groups_filesize', 'class_file' => 'includes/class_attach_cp_fields'),
								),
							),

							'ext' => array(
								'name' => 'Extensions',
								'file' => 'includes/acp/acp_attach_ext',
								'auth' => array(POST_PANELS_URL => 'access'),
								'fields' => array(
									'extension' => array('type' => 'varchar', 'legend' => 'Extension', 'length' => '5'),
									'ext_comment' => array('type' => 'varchar', 'legend' => 'Explanation'),
									'ext_group_id' => array('type' => 'list', 'legend' => 'Extension_group', 'options' => '[func][includes/class_attach_cp_fields]get_extension_groups_list', 'options.no_translate' => '1', 'value' => '\'0\''),
								),
							),
						),
					),

					'manage' => array(
						'name' => 'Attach_management',
						'auth' => array(POST_PANELS_URL => 'access'),
						'options' => array(

							'stat' => array(
								'name' => 'Attach_statistics',
								'file' => 'includes/acp/acp_attach_statistics',
								'auth' => array(POST_PANELS_URL => 'access'),
							),

							'users' => array(
								'name' => 'Attach_userlist',
								'file' => 'includes/acp/acp_attach_userlist',
								'auth' => array(POST_PANELS_URL => 'access'),
							),

							'search' => array(
								'name' => 'Attach_search',
								'file' => 'includes/acp/acp_attach_search',
								'auth' => array(POST_PANELS_URL => 'access'),
							),
						),
					),

					'maintain' => array(
						'name' => 'Attach_maintain',
						'file' => 'includes/acp/acp_attach_maintain',
						'auth' => array(POST_PANELS_URL => 'access'),
					),
				),
			),
		),
	),
);


// auths definitions
$patch_auths = array(
	POST_FORUM_URL => array(
		'auth_download' => array(),
		'auth_attachments' => array(),
	),
	POST_PANELS_URL => array(
		'access' => array(
			GROUP_ADMIN => array('acp.attachcp' => true, 'acp.attachcp.config' => true, 'acp.attachcp.config.quotadef' => true, 'acp.attachcp.config.server' => true, 'acp.attachcp.config.options' => true, 'acp.attachcp.config.layout' => true, 'acp.attachcp.maintain' => true, 'acp.attachcp.manage' => true, 'acp.attachcp.manage.stat' => true, 'acp.attachcp.manage.search' => true, 'acp.attachcp.manage.users' => true, 'acp.attachcp.config.cat' => true, 'acp.attachcp.config.cat.images' => true, 'acp.attachcp.config.cat.stream' => true, 'acp.attachcp.config.cat.swf' => true, 'acp.attachcp.config.ext' => true, 'acp.attachcp.config.cat.none' => true, 'acp.attachcp.config.cat.denied' => true, 'acp.attachcp.config.group' => true),
		),
	),
);


?>